// ✅ 导入 SCSS 文件，Vite 会自动编译并注入 CSS
import './styles/main.scss'
// 引入 flexble.js
import './utils/flexble'



import { createApp } from 'vue'
import { createPinia } from 'pinia'
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'

import App from './App.vue'
import router from './router'
const pinia = createPinia()
pinia.use(piniaPluginPersistedstate)
// 判断是否为生产环境
if (import.meta.env.PROD) {
  import('./auto.update.js')
}
const app = createApp(App)
import SocketPlugin from './plugins/io'
// 在生产环境中，不指定连接地址，让插件使用默认配置
app.use(SocketPlugin, {
  options: {
    // 可选配置，如自动重连
    reconnection: true,
    reconnectionAttempts: 5,
    reconnectionDelay: 1000
  }
})

app.use(pinia)
app.use(router)

app.mount('#app')
